<template>
  <div>
       <el-input-number v-model="num" @change="handleChange" :min="1" :max="10" label="描述文字"></el-input-number>
      <div>
     <el-button type="primary" plain @click="$emit('update:query', query-100)">花钱</el-button>
  </div>
  </div>
  
</template>

<script>
export default {
  props:["query"],
    data() {
      return {
        num: 1
      };
    },
    methods: {
      handleChange(value) {
        // console.log(value);
        this.$emit('update:query', this.query+100)
        this.$store.commit("vuex/setPart1",{id:value,name:`张${value}`})
        if(value>=4){
            this.$store.commit("vuex/setSplice",{id:value,name:`张${value}`})
        }else
        this.$store.commit("vuex/setTab",{id:value,name:`张${value}`})
        
      }
    }
}
</script>

<style>

</style>
